{template 'common/header'}
<div class="main">
	
<script type="text/javascript" src="../addons/meepo_weixiangqin/template/jquery-1.7.2.min.js"></script>
<script>
	function selectall(obj, name){
		$('input[name="'+name+'[]"]:checkbox').each(function() {
			$(this).attr("checked", $(obj).attr('checked') ? true : false);
		});
	}
	
</script>

<ul class="nav nav-tabs">
	<li {if $_GPC['status'] == 0 && $_GPC['op'] != 'post'} class="active"{/if}><a href="{php echo $this->createWebUrl('tjapply', array('id' => $id, 'status' => 0))}">推荐待审核</a></li>
	<li {if $_GPC['status'] == 1 && $_GPC['op'] != 'post'} class="active"{/if}><a href="{php echo $this->createWebUrl('tjapply', array('id' => $id, 'status' => 1))}">推荐已审核</a></li>
	<li><a href="{php echo $this->createWebUrl('payrecord')}">充值记录</a></li>
	<li><a href="{php echo $this->createWebUrl('baoyuerecord')}">包月记录</a></li>
	<li><a href="{php echo $this->createWebUrl('Exchangerecord')}">兑换记录</a></li>
	<li><a href="{php echo $this->createWebUrl('chatcontent')}">聊天记录</a></li>
	<li><a href="{php echo $this->createWebUrl('phototjapply')}">图片管理</a></li>
    <li><a href="{php echo $this->createWebUrl('set')}">基本设置</a></li>
</ul>
{if $op == 'display'}
<div class="panel panel-info">
	<div class="panel-heading">筛选</div>
	<div class="panel-body">
		<form action="./index.php" method="get" class="form-horizontal" role="form">
			<input type="hidden" name="c" value="site" />
			<input type="hidden" name="a" value="entry" />
			<input type="hidden" name="m" value="meepo_weixiangqin" />
			<input type="hidden" name="do" value="tjapply" />
			{if $_GPC['status']=='1'}
			   <input type="hidden" name="status" value="1" />
			{else}
             <input type="hidden" name="status" value="0" />
			{/if}
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">昵称</label>
				<div class="col-xs-12 col-sm-8 col-lg-9">
					<input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}" placeholder="请输入粉丝昵称">
				</div>
			</div>
			<div class="form-group">
				<div class=" col-xs-12 col-sm-2 col-lg-2">
					<input type="submit"  value="搜索" class="btn btn-primary" />
				</div>
			</div>

		</form>
	</div>
</div>

<div class="panel panel-success">
	<div class="panel-heading">
		{if $_GPC['status'] == 0}待审核{/if}
		{if $_GPC['status'] == 1}已审核{/if}
	</div>
	<div class="panel-body">
		<div class="main" id="table-list">
			<form action="" method="post" onsubmit="">
				<div class="table-responsive">
					<table class="table table-hover">
						<thead class="navbar-inner">
						<tr>
							<th class="row-first">选择</th>
							<th>用户<i></i></th>
							<th>扣取积分数</th>
							<th>当前状态</th>
							<th>申请时间<i></i></th>
							
						</tr>
						</thead>
						<tbody>
						{loop $list $row}
						
						<tr>
							<td class="row-first"><input type="checkbox" name="select[]" value="{$row['id']}" /></td>
							<td class="row-hover">
								<img width="50" src="{if preg_match('/http:(.*)/',$row['avatar'])}{$row['avatar']} {else if preg_match('/images(.*)/',$row['avatar'])} {$_W['attachurl']}{$row['avatar']}     {else}{MEEPORES}/static/friend/images/cdhn80.jpg{/if}" class="avatar" />
								<div class="mainContent">
									<div class="nickname"><a href="{php echo $this->createWebUrl('list', array('keyword' =>$row['nickname'] , 'isshow' =>'1'))}">{$row['nickname']}</a></div>
								</div>
							</td>
							<td>{$row['payment']}积分</td>
							<td>{if $row['yingcang']=='1'}显示{else}隐藏{/if}</td>
							<td style="font-size:12px; color:#666;">
								<div style="margin-bottom:10px;">{php echo date('Y-m-d', $row['createtime']);}</div>
								<div>{php echo date('H:i:s', $row['createtime']);}</div>
							</td>
							
						</tr>
						{/loop}
						</tbody>
					</table>
					{if !empty($list)}
					<table class="table">
						<tr>
							<td style="width:50px;" class="row-first"><input type="checkbox" onclick="selectall(this, 'select');" /></td>
							<td colspan="4">
								{if $_GPC['status'] == 0}
								<input type="submit" name="verify" value="审核" class="btn btn-primary" />
								{/if}
								<input type="submit" name="delete" value="删除" class="btn btn-primary" />
								<input type="hidden" name="token" value="{$_W['token']}" />
							</td>
						</tr>
					</table>
					{/if}
					{$pager}
				</div>
			</form>
		</div>
	</div>


{/if}
{template 'common/footer'}
